.class public abstract Lcom/instagram/android/r/b;
.super Lcom/instagram/d/a;
.source "SaveUploadImageTask.java"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/instagram/d/a",
        "<",
        "Ljava/lang/Void;",
        "Ljava/lang/Void;",
        "Lcom/instagram/pendingmedia/model/c;",
        ">;"
    }
.end annotation


# instance fields
.field private final a:Landroid/content/Context;

.field private final b:I

.field private final c:I

.field private final d:Lcom/instagram/pendingmedia/model/c;


# direct methods
.method public constructor <init>(Landroid/content/Context;IILcom/instagram/pendingmedia/model/c;)V
    .locals 1
    .parameter
    .parameter
    .parameter
    .parameter

    .prologue
    .line 27
    invoke-direct {p0}, Lcom/instagram/d/a;-><init>()V

    .line 28
    invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    iput-object v0, p0, Lcom/instagram/android/r/b;->a:Landroid/content/Context;

    .line 29
    iput p2, p0, Lcom/instagram/android/r/b;->b:I

    .line 30
    iput p3, p0, Lcom/instagram/android/r/b;->c:I

    .line 31
    iput-object p4, p0, Lcom/instagram/android/r/b;->d:Lcom/instagram/pendingmedia/model/c;

    .line 32
    return-void
.end method

.method private static a(Landroid/content/Context;)Ljava/lang/String;
    .locals 7
    .parameter

    .prologue
    .line 81
    new-instance v0, Ljava/io/File;

    invoke-virtual {p0}, Landroid/content/Context;->getCacheDir()Ljava/io/File;

    move-result-object v1

    const-string v2, "pending_media_%d.jpg"

    const/4 v3, 0x1

    new-array v3, v3, [Ljava/lang/Object;

    const/4 v4, 0x0

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v5

    invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v5

    aput-object v5, v3, v4

    invoke-static {v2, v3}, Lcom/instagram/n/i;->a(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v0, v1, v2}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V

    invoke-virtual {v0}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method


# virtual methods
.method protected varargs a([Ljava/lang/Void;)Lcom/instagram/pendingmedia/model/c;
    .locals 6
    .parameter

    .prologue
    .line 37
    iget-object v0, p0, Lcom/instagram/android/r/b;->d:Lcom/instagram/pendingmedia/model/c;

    iget-object v1, p0, Lcom/instagram/android/r/b;->a:Landroid/content/Context;

    invoke-static {v1}, Lcom/instagram/android/r/b;->a(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/instagram/pendingmedia/model/c;->e(Ljava/lang/String;)V

    .line 39
    iget-object v0, p0, Lcom/instagram/android/r/b;->d:Lcom/instagram/pendingmedia/model/c;

    invoke-virtual {v0}, Lcom/instagram/pendingmedia/model/c;->q()Ljava/lang/String;

    move-result-object v0

    const/16 v1, 0x5f

    iget v2, p0, Lcom/instagram/android/r/b;->c:I

    invoke-static {v0, v1, v2}, Lcom/instagram/creation/photo/gl/NativeBridge;->saveImageInBuffer(Ljava/lang/String;II)J

    move-result-wide v0

    .line 45
    const-wide/16 v2, 0x0

    cmp-long v2, v0, v2

    if-gez v2, :cond_0

    .line 46
    const-string v2, "SaveUploadImageTask"

    const-string v3, "Unable to save jpeg timestamp = %s path = %s bufferRef = %s"

    const/4 v4, 0x3

    new-array v4, v4, [Ljava/lang/Object;

    const/4 v5, 0x0

    invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v0

    aput-object v0, v4, v5

    const/4 v0, 0x1

    iget-object v1, p0, Lcom/instagram/android/r/b;->d:Lcom/instagram/pendingmedia/model/c;

    invoke-virtual {v1}, Lcom/instagram/pendingmedia/model/c;->q()Ljava/lang/String;

    move-result-object v1

    aput-object v1, v4, v0

    const/4 v0, 0x2

    iget v1, p0, Lcom/instagram/android/r/b;->c:I

    invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v1

    aput-object v1, v4, v0

    invoke-static {v3, v4}, Lcom/instagram/n/i;->a(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-static {v2, v0}, Lcom/instagram/g/c;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 53
    const/4 v0, 0x0

    .line 66
    :goto_0
    return-object v0

    .line 56
    :cond_0
    iget-object v2, p0, Lcom/instagram/android/r/b;->d:Lcom/instagram/pendingmedia/model/c;

    invoke-static {v0, v1}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v2, v0}, Lcom/instagram/pendingmedia/model/c;->c(Ljava/lang/String;)V

    .line 57
    iget-object v0, p0, Lcom/instagram/android/r/b;->d:Lcom/instagram/pendingmedia/model/c;

    invoke-static {}, Lcom/instagram/creation/photo/gl/NativeBridge;->getCurrentFilter()I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/instagram/pendingmedia/model/c;->b(I)V

    .line 58
    iget-object v0, p0, Lcom/instagram/android/r/b;->d:Lcom/instagram/pendingmedia/model/c;

    iget v1, p0, Lcom/instagram/android/r/b;->b:I

    invoke-virtual {v0, v1}, Lcom/instagram/pendingmedia/model/c;->a(I)V

    .line 59
    iget-object v0, p0, Lcom/instagram/android/r/b;->a:Landroid/content/Context;

    iget-object v1, p0, Lcom/instagram/android/r/b;->d:Lcom/instagram/pendingmedia/model/c;

    invoke-static {v0, v1}, Lcom/instagram/android/service/PendingMediaService;->c(Landroid/content/Context;Lcom/instagram/pendingmedia/model/c;)V

    .line 62
    invoke-static {}, Lcom/instagram/m/a/a;->a()Lcom/instagram/m/a/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/m/a/a;->g()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 63
    iget-object v0, p0, Lcom/instagram/android/r/b;->d:Lcom/instagram/pendingmedia/model/c;

    invoke-virtual {v0}, Lcom/instagram/pendingmedia/model/c;->q()Ljava/lang/String;

    move-result-object v0

    iget-object v1, p0, Lcom/instagram/android/r/b;->d:Lcom/instagram/pendingmedia/model/c;

    invoke-static {v0, v1}, Lcom/instagram/android/people/c/a;->a(Ljava/lang/String;Lcom/instagram/pendingmedia/model/c;)V

    .line 66
    :cond_1
    iget-object v0, p0, Lcom/instagram/android/r/b;->d:Lcom/instagram/pendingmedia/model/c;

    goto :goto_0
.end method

.method protected bridge synthetic a([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .parameter

    .prologue
    .line 18
    check-cast p1, [Ljava/lang/Void;

    invoke-virtual {p0, p1}, Lcom/instagram/android/r/b;->a([Ljava/lang/Void;)Lcom/instagram/pendingmedia/model/c;

    move-result-object v0

    return-object v0
.end method

.method public abstract a()V
.end method

.method protected a(Lcom/instagram/pendingmedia/model/c;)V
    .locals 0
    .parameter

    .prologue
    .line 71
    invoke-super {p0, p1}, Lcom/instagram/d/a;->a(Ljava/lang/Object;)V

    .line 73
    if-eqz p1, :cond_0

    .line 74
    invoke-virtual {p0, p1}, Lcom/instagram/android/r/b;->b(Lcom/instagram/pendingmedia/model/c;)V

    .line 78
    :goto_0
    return-void

    .line 76
    :cond_0
    invoke-virtual {p0}, Lcom/instagram/android/r/b;->a()V

    goto :goto_0
.end method

.method protected bridge synthetic a(Ljava/lang/Object;)V
    .locals 0
    .parameter

    .prologue
    .line 18
    check-cast p1, Lcom/instagram/pendingmedia/model/c;

    invoke-virtual {p0, p1}, Lcom/instagram/android/r/b;->a(Lcom/instagram/pendingmedia/model/c;)V

    return-void
.end method

.method public abstract b(Lcom/instagram/pendingmedia/model/c;)V
.end method
